import React from "react";
import "./index.scss";
/**公共协议勾选 */
const AgreeCheckbox = props => (
	<div
		className={
			`green-agree-checkbox 
			${props.circle && "green-agree-checkbox-circle"}
			${props.isXhb && "green-agree-checkbox-xhb"} 
			`}
		onClick={props.onChange}
	>
		<input
			type="checkbox"
			checked={props.checked}
			onChange={props.onChange}
			onClick={props.onChange}
			name="checkbox"
		/>
		<label htmlFor="checkbox"></label>
		<span className={`text-wrapper ${props.multi ? "multi" : "single"}`}>
			{props.children}
		</span>
	</div>
);
export default AgreeCheckbox;
